package com.naiterui.ehp.bs.consult.controller.inner;

import java.util.List;

import org.springframework.web.bind.annotation.*;

import com.naiterui.ehp.bp.bo.consult.SuperviseVideoBO;
import com.naiterui.ehp.bp.bo.consult.VideoConsultMessageBO;
import com.naiterui.ehp.bp.support.exception.PublicService;
import com.naiterui.ehp.bp.support.exception.ResponseVO;
import com.naiterui.ehp.bs.consult.service.IVideoConsultMessageService;
import com.naiterui.ehp.bs.consult.service.IVideoSuperviseService;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * <pre>
 * 获取视频问诊相关监管业务数据接口
 * </pre>
 *
 * @author fangguanhong
 * @date 2021/3/23 下午2:58
 * @since 1.0.0
 */
@Slf4j
@RestController
@RequestMapping("/inner/supervise")
@RequiredArgsConstructor
public class InnerVideoSuperviseController {

    private final IVideoSuperviseService videoSuperviseService;
    private final IVideoConsultMessageService videoMessageService;

    @GetMapping("/recom/info")
    public ResponseVO<SuperviseVideoBO> getVideoSuperviseInfo(String start, String end) {
        return PublicService.returnResponseVO(videoSuperviseService.getVideoSuperviseInfo(start, end));
    }

    @PostMapping("getVideoConsultMessage")
    public ResponseVO<List<VideoConsultMessageBO>> getVideoConsultMessage(@RequestBody List<String> contents,
        @RequestParam("type") Integer type) {
        return PublicService.returnResponseVO(videoMessageService.getVideoConsultMessage(contents, type));
    }
}
